import request from '@/utils/request'

// 查询列表
export function GetListAPI (params) {
  return request({
    url: '/equipment/repair/list',
    method: 'GET',
    params
  })
}
/**
 * 批量提交
 * @param {*} data 
 * @returns 
 */
export function BatchAuditAPI (data) {
  return request({
    url: '/equipment/repair/batchAudit',
    method: 'PUT',
    data
  })
}
/**
 * 批量撤销
 * @param {*} data 
 * @returns 
 */
export function RatchRevocationAPI (data) {
  return request({
    url: '/equipment/repair/revokeEquipment',
    method: 'PUT',
    data
  })
}
// 新增设备知识库
export function AddDataAPI (data) {
  return request({
    url: '/equipment/repair/add',
    method: 'POST',
    data
  })
}

// 修改知识库
export function EditDataAPI (data) {
  return request({
    url: '/equipment/repair/edit',
    method: 'PUT',
    data
  })
}

// 查询单个
export function GetDeiltsAPI (params) {
  return request({
    url: '/equipment/repair/' + params,
    method: 'GET'
  })
}

// 删除单个
export function DelDataAPI (params) {
  return request({
    url: '/equipment/repair/' + params,
    method: 'DELETE'
  })
}

// 派工
export function DispatchAPI (data) {
  return request({
    url: '/equipment/repair/dispatch',
    method: 'PUT',
    data
  })
}

// 执行维修
export function MaintenanceAPI (data) {
  return request({
    url: '/equipment/repair/maintenance',
    method: 'PUT',
    data
  })
}

// 提交审核
export function SubmitAPI (data) {
  return request({
    url: '/equipment/repair/submit',
    method: 'PUT',
    data
  })
}

// 提交审核
export function AuditAPI (data) {
  return request({
    url: '/equipment/repair/audit',
    method: 'PUT',
    data
  })
}

// 获取班组
export function GetDataByGroupCodeAPI (params) {
  return request({
    url: '/production/group/getDataByGroupCode',
    method: 'GET',
    params
  })
}

// 添加知识库
export function AddKnowLedgeAPI (data) {
  return request({
    url: '/equipment/repair/addKnowLedge/' + data,
    method: 'GET'
  })
}
